package com.ygxsk.carhome.response;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by itchenqi on 2018/11/24 0024.
 * description：维修空间，报修的九宫格的底部 实体，但是和红色物业不同
 */
public class CategoryAddBottomBean implements Parcelable {


    private String spaceId;

    private String spaceKind;


    /**
     * 用于判断用户是否选中了该按钮
     */
    private boolean isChecked = false;//默认的都是等于false的

    public boolean isChecked() {
        return isChecked;
    }

    public void setChecked(boolean checked) {
        isChecked = checked;
    }


    public String getSpaceId() {
        return spaceId;
    }

    public void setSpaceId(String spaceId) {
        this.spaceId = spaceId;
    }

    public String getSpaceKind() {
        return spaceKind;
    }

    public void setSpaceKind(String spaceKind) {
        this.spaceKind = spaceKind;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.spaceId);
        dest.writeString(this.spaceKind);
        dest.writeByte(this.isChecked ? (byte) 1 : (byte) 0);
    }

    public void readFromParcel(Parcel source) {
        this.spaceId = source.readString();
        this.spaceKind = source.readString();
        this.isChecked = source.readByte() != 0;
    }

    public CategoryAddBottomBean() {
    }

    protected CategoryAddBottomBean(Parcel in) {
        this.spaceId = in.readString();
        this.spaceKind = in.readString();
        this.isChecked = in.readByte() != 0;
    }

    public static final Parcelable.Creator<CategoryAddBottomBean> CREATOR = new Parcelable.Creator<CategoryAddBottomBean>() {
        @Override
        public CategoryAddBottomBean createFromParcel(Parcel source) {
            return new CategoryAddBottomBean(source);
        }

        @Override
        public CategoryAddBottomBean[] newArray(int size) {
            return new CategoryAddBottomBean[size];
        }
    };
}
